Page({
  data: {
    params: {
      name: '王思',
      sex: 0,
      age: '14-20岁',
      recordId: 1,
      peferralStatus:'Confirmed',
      statusName:'待分配科室',
      city: '江苏省无锡市',
      phoneNumber: '12343532435',
      creatTime: '2020-03-23 12:30',
      statusDatail: '待分配转入科室',
    },
    steps: [
      {
        text: '科室确认',
        remark: '',
        time: '2020-09-23 23:33',
      },
      {
        text: '联系患者',
        remark: '描述信息',
        time: '2020-09-23 23:33',
      },
      {
        text: '患者住院',
        time: '2020-09-23 23:33',
      },
      {
        text: '患者出院',
        remark: '描述信息',
        time: '2020-09-23 23:33',
      },
    ],
    department: '',
    showShare: false,
    pendingShow: false,
    remarkShow: false,
    recordId: null,
  },
  onLoad (options) {
    console.log(options.tabActive); // 输出: value1
    console.log(options.recordId); // 输出: value2
    this.setData({
      showShare: options.tabActive === '1',
      recordId: options.recordId
    })
  },
  gotoViewPage(e) {
    const { currentTarget: { dataset: { recordId } } } = e;
    wx.navigateTo({
      url: `/pages/viewInfo/viewInfo?&recordId=${recordId}`,
    })
  },

  searchDepartmentShow() {
    this.setData({
      pendingShow: true,
    })
  },
  onRemarkShow() {
    this.setData({
      remarkShow: true,
    })
  },
  gotoMessagePage(e) {
    const { currentTarget: { dataset: { recordId } } } = e;
    wx.navigateTo({
      url: `/pages/messageDetail/messageDetail?&recordId=${recordId}`,
    })
  },
})